<?php

require_once("../../system.php");

$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('tools');
require_once($GO_LANGUAGE->get_language_file('tools'));

load_basic_controls();

$form = new form('tools_form');
$form->add_html_element(new html_element('h1', $lang_modules['tools']));
$form->add_html_element(new html_element('p', $tool_warning));

$table = new table();

$row = new table_row();
$row->add_cell(new table_cell($tool_backup_database));
$button = new button($cmdRun, "javascript:document.location='backupdb.php';");
$button->set_attribute('style','margin:0px;margin-top:0px;');
$row->add_cell(new table_cell($button->get_html()));
$table->add_row($row);

$row = new table_row();
$row->add_cell(new table_cell($tool_check_database));
$button = new button($cmdRun, "javascript:document.location='dbcheck.php';");
$button->set_attribute('style','margin:0px;margin-top:0px;');
$row->add_cell(new table_cell($button->get_html()));
$table->add_row($row);

$row = new table_row();
$row->add_cell(new table_cell($tool_import_users));
$button = new button($cmdRun, "javascript:document.location='importusers.php';");
$button->set_attribute('style','margin:0px;margin-top:0px;');
$row->add_cell(new table_cell($button->get_html()));
$table->add_row($row);

$row = new table_row();
$row->add_cell(new table_cell($tool_remove_duplicate));
$button = new button($cmdRun, "javascript:document.location='rm_duplicates.php';");
$button->set_attribute('style','margin:0px;margin-top:0px;');
$row->add_cell(new table_cell($button->get_html()));
$table->add_row($row);

$row = new table_row();
$row->add_cell(new table_cell($tool_execute_query));
$button = new button($cmdRun, "javascript:document.location='query.php';");
$button->set_attribute('style','margin:0px;margin-top:0px;');
$row->add_cell(new table_cell($button->get_html()));
$table->add_row($row);
/*
$row = new table_row();
$row->add_cell(new table_cell('Show db scheme'));
$button = new button($cmdRun, "javascript:document.location='create_db_scheme.php';");
$row->add_cell(new table_cell($button->get_html()));
$table->add_row($row);
*/
$form->add_html_element($table);

require_once($GO_THEME->theme_path."header.inc");
echo $form->get_html();
require_once($GO_THEME->theme_path."footer.inc");